<?php

	namespace information\action;

	use herosphp\bean\Beans;
	use herosphp\core\Controller;
	use herosphp\core\WebApplication;
	use herosphp\http\HttpRequest;
	use herosphp\utils\Page;

	/**--tmpl-use--**/

	class SingleAction extends CommonAction {

		protected $noticeService = null;
		public function C_start()
		{
			$this->noticeService = Beans::get("information.informationSinglepage.service");
			parent::C_start();
		}

		public function index(HttpRequest $request) {
			$id = $request->getParameter('id',"intval");
			$item = $this->noticeService->getItem(array('id'=>$id));
			$this->assign('item',$item);
			$this->setHead($item['title'],$item['summary'],$item['summary']);
			$this->setView(strtolower($request->getAction()) . '/single_index');
        }

		public function protocol(HttpRequest $request)
		{
			//$service = Beans::get('admin.adminSetting.service');
			//$settings = $service->getSettings(array("site_name","title","keywords","description",'register_contact'));
			//$this->assign('__settings',$settings);
			$this->assign("protocol",C('register_contact'));
			$this->setView(strtolower($request->getAction()) . '/single_protocol');
		}
	}



